package com.example.chengche_lol.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.chengche_lol.R;
import com.example.chengche_lol.beans.NewsMatchBean;

import org.jetbrains.annotations.NotNull;

public class NewsMatchAdapter extends BaseQuickAdapter<NewsMatchBean, BaseViewHolder> {

    public NewsMatchAdapter() {
        super(R.layout.item_news_article);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsMatchBean newsMatchBean) {
        baseViewHolder.setText(R.id.article_title,newsMatchBean.getTitletext());
        baseViewHolder.setImageResource(R.id.img_cover,newsMatchBean.getImageView());
        baseViewHolder.setText(R.id.tv_tag,newsMatchBean.getTag());
        baseViewHolder.setText(R.id.article_user,newsMatchBean.getUser());
        baseViewHolder.setText(R.id.tv_view_number,newsMatchBean.getViewnumber());
    }

}
